﻿using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace bbtpClient.Entities
{
    /// <remarks/>
    [GeneratedCode("System.Xml", "2.0.50727.4927")]
    [Serializable]
    [DebuggerStepThrough]
    [DesignerCategory("code")]
    [XmlType(Namespace = "authentication.fpmi.bsu.by")]
    public class LoginResponse : object, INotifyPropertyChanged
    {
        private Result resultField;

        private bool resultFieldSpecified;

        private Role roleField;

        private bool roleFieldSpecified;

        private string sessionIdField;

        /// <remarks/>
        [XmlElement(Form = XmlSchemaForm.Unqualified, Order = 0)]
        public Result result
        {
            get { return resultField; }
            set
            {
                resultField = value;
                RaisePropertyChanged("result");
            }
        }

        /// <remarks/>
        [XmlIgnore]
        public bool resultSpecified
        {
            get { return resultFieldSpecified; }
            set
            {
                resultFieldSpecified = value;
                RaisePropertyChanged("resultSpecified");
            }
        }

        /// <remarks/>
        [XmlElement(Form = XmlSchemaForm.Unqualified, Order = 1)]
        public Role role
        {
            get { return roleField; }
            set
            {
                roleField = value;
                RaisePropertyChanged("role");
            }
        }

        /// <remarks/>
        [XmlIgnore]
        public bool roleSpecified
        {
            get { return roleFieldSpecified; }
            set
            {
                roleFieldSpecified = value;
                RaisePropertyChanged("roleSpecified");
            }
        }

        /// <remarks/>
        [XmlElement(Form = XmlSchemaForm.Unqualified, Order = 2)]
        public string sessionId
        {
            get { return sessionIdField; }
            set
            {
                sessionIdField = value;
                RaisePropertyChanged("sessionId");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = PropertyChanged;
            if ((propertyChanged != null))
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

    /// <remarks/>
    [GeneratedCode("System.Xml", "2.0.50727.4927")]
    [Serializable]
    [XmlType(Namespace = "authentication.fpmi.bsu.by")]
    public enum Result
    {
        /// <remarks/>
        SUCCESS,

        /// <remarks/>
        FAIL,
    }
}